package com.campus.shop.common;

/**
 * @Description:自定义报错枚举
 * @Author: xr
 * @Date: 2023/3/6 17:01
 */
public enum Errors {
    INVALID_CODE(10000,"验证码不正确"),
    UNDEFINE_DATA_EXISTS(10001,"数据不存在"),
    USER_NOT_EXIT(10002,"用户不存在"),
    USER_PASSWORD_ERROR(10003,"用户名或密码不正确"),
    LACK_PARAMS_MSG(10004,"缺少参数"),
    TOKEN_NOT_EXIT(401,"token不存在,请重新登录"),
    TOKEN_INVALID(401,"token失效,请重新登录"),
    TOKEN_USER_ERROR(401,"用户不存在"),
    DATA_SAVE_ERROR(10005,"操作失败"),
    FILE_NOT_EXIT(10006,"文件不存在"),
    USER_STATUS_DISABLE(10007,"该账号已被禁用"),
    REQUEST_METHOD_ERROR(1008,"请求路径错误"),
    PHONE_HAS_REGISTER(1010,"手机号已注册"),
    BODY_NOT_MATCH(1009,"空指针"),
    FULL_AUTHENTICATION(1010,"暂无访问权限"),
    LIMIT_ADDRESS_NUM(1011,"地址总数已达上限"),
    ORDER_CREATE_FAIL(1012,"订单创建失败"),
    PAY_WAY_ERROR(1013,"支付方式不存在"),
    PAY_METHOD_CLOSE(1016,"支付方式暂未开通"),
    PAY_STATUS_ERROR(1014,"订单支付状态不正确"),
    BALANCE_PAY_ERROR(1015,"账户余额不足,支付失败");


    private int code ;
    private String msg ;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
    Errors(int code, String msg){
        this.code = code;
        this.msg = msg;
    }
}
